package pt.nmfa.peste.session;

import pt.nmfa.peste.entity.*;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.framework.EntityHome;

@Name("parametersHome")
public class ParametersHome extends EntityHome<Parameters> {

	public void setParametersFieldName(String id) {
		setId(id);
	}

	public String getParametersFieldName() {
		return (String) getId();
	}

	@Override
	protected Parameters createInstance() {
		Parameters parameters = new Parameters();
		return parameters;
	}

	public void load() {
		if (isIdDefined()) {
			wire();
		}
	}

	public void wire() {
		getInstance();
	}

	public boolean isWired() {
		return true;
	}

	public Parameters getDefinedInstance() {
		return isIdDefined() ? getInstance() : null;
	}

}
